package com.fooddelivery.Common.Execption;

public enum ErrorCode {
    // 用户相关错误
    USER_ALREADY_EXISTS("1001", "账号已存在，请更换其他账号！"),
    USER_USERNAME_NULL("1000", "用户名不能为空！"),
    USER_NOT_FOUND("1002", "用户不存在！"),
    USER_ACCOUNT_LOCKED("1003", "用户账号已被锁定！"),

    // 权限相关错误
    PERMISSION_DENIED("2001", "权限不足，无法访问！"),
    TOKEN_INVALID("2002", "Token 无效或已过期！"),

    // 菜品相关错误
    DISH_CATEGORY_NOT_NULL("3000", "菜品类别不存在！"),
    DISH_NAME_ALREADY_EXISTS("3001", "菜品名称已存在，请更换其他名称！");

    private final String code;
    private final String message;

    ErrorCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
